package com.amado.easyui2.util;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonParser.Feature;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

public class ObjectMapperConfig extends ObjectMapper {
    private static final long serialVersionUID = -813661394135988505L;

    public ObjectMapperConfig() {
        this.configure(Feature.ALLOW_SINGLE_QUOTES, false);
        this.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
        this.setSerializationInclusion(Include.NON_NULL);
        this.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    }
}
